:TOP
@CLS
@ECHO OFF

ECHO Welcome to SN-DB database installer.
ECHO Insert please:

set /p user=   Database login: 
set /p pass=   Password: 

SET world_db=db_world
SET dumppath=.\dump\
SET port=3306
SET host=127.0.0.1
SET mysqlpath=.\MySQL
SET devsql=.\development\ascent_world
SET changsql=.\development\changesets
SET arc2ascent=.\development\extras\arc_to_ascent.sql

:Begin
CLS
ECHO.
ECHO    http://www.sn-wow.de
ECHO.
ECHO 	i - Import World Database, NOTE! Whole db will be overwritten!
ECHO 	W - Backup World Database.
ECHO 	C - Backup Character Database.
ECHO 	V - Convert SN-DB ArcEmu to SN-DB Ascent.
ECHO 	R - Import Changeset.
ECHO.
ECHO 	D - Dump your table.
ECHO.
ECHO 	X - Exit this tool
ECHO.
SET /p v= 		Enter a char:
IF %v%==* GOTO error
IF %v%==i GOTO import
IF %v%==I GOTO import
IF %v%==w GOTO dumpworld
IF %v%==W GOTO dumpworld
IF %v%==c GOTO dumpchar
IF %v%==C GOTO dumpchar
IF %v%==r GOTO changeset
IF %v%==R GOTO changeset
IF %v%==v GOTO convert
IF %v%==V GOTO convert
IF %v%==D GOTO dumpever
IF %v%==d GOTO dumpever
IF %v%==x GOTO exit
IF %v%==X GOTO exit
set v=
GOTO error

:import
CLS
ECHO First Lets Clean !!
Echo.
ECHO DROP database IF EXISTS `%world_db%`; > %devsql%\databaseclean.sql
ECHO CREATE database IF NOT EXISTS `%world_db%`; >> %devsql%\databaseclean.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% < %devsql%\databaseclean.sql
@del %devsql%\databaseclean.sql
echo Database %world_db% deleted successfully !
Echo.
echo Importing..
echo.
ECHO [ 1/91] import: ai_agents.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\ai_agents.sql

ECHO [ 2/91] import: ai_threattospellid.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\ai_threattospellid.sql

ECHO [ 3/91] import: creature_formations.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_formations.sql

ECHO [ 4/91] import: creature_names.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_names.sql

ECHO [ 5/91] import: creature_proto.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_proto.sql

ECHO [ 6/91] import: petdefaultspells.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\petdefaultspells.sql

ECHO [ 7/91] import: npc_gossip_textid.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\npc_gossip_textid.sql

ECHO [ 8/91] import: npc_monstersay.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\npc_monstersay.sql

ECHO [ 9/91] import: npc_text.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\npc_text.sql

ECHO [10/91] import: auctionhouse.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\auctionhouse.sql

ECHO [11/91] import: ItemPetFood.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\ItemPetFood.sql

ECHO [12/91] import: Transport_creatures.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\Transport_creatures.sql

ECHO [13/91] import: creature_timed_emotes.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_timed_emotes.sql

ECHO [14/91] import: loot_creatures.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\loot_creatures.sql

ECHO [15/91] import: loot_fishing.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\loot_fishing.sql

ECHO [16/91] import: loot_items.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\loot_items.sql

ECHO [17/91] import: item_randomprop_groups.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\item_randomprop_groups.sql

ECHO [18/91] import: item_randomsuffix_groups.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\item_randomsuffix_groups.sql

ECHO [19/91] import: loot_gameobjects.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\loot_gameobjects.sql

ECHO [20/91] import: loot_prospecting.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\loot_prospecting.sql

ECHO [21/91] import: loot_disenchanting.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\loot_disenchanting.sql

ECHO [22/91] import: loot_pickpocketing.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\loot_pickpocketing.sql

ECHO [23/91] import: loot_skinning.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\loot_skinning.sql

ECHO [24/91] import: itempages.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\itempages.sql

ECHO [25/91] import: items.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\items.sql

ECHO [26/91] import: vendors.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\vendors.sql

ECHO [27/91] import: gameobject_quest_finisher.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\gameobject_quest_finisher.sql

ECHO [28/91] import: gameobject_quest_starter.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\gameobject_quest_starter.sql

ECHO [29/91] import: creature_quest_finisher.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_quest_finisher.sql

ECHO [30/91] import: creature_quest_starter.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_quest_starter.sql

ECHO [31/91] import: quests.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\quests.sql

ECHO [32/91] import: gameobject_quest_item_binding.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\gameobject_quest_item_binding.sql

ECHO [33/91] import: gameobject_quest_pickup_binding.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\gameobject_quest_pickup_binding.sql

ECHO [34/91] import: reputation_creature_onkill.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\reputation_creature_onkill.sql

ECHO [35/91] import: reputation_faction_onkill.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\reputation_faction_onkill.sql

ECHO [36/91] import: reputation_instance_onkill.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\reputation_instance_onkill.sql

ECHO [37/91] import: playercreateinfo.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\playercreateinfo.sql

ECHO [38/91] import: playercreateinfo_bars.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\playercreateinfo_bars.sql

ECHO [39/91] import: playercreateinfo_items.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\playercreateinfo_items.sql

ECHO [40/91] import: playercreateinfo_skills.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\playercreateinfo_skills.sql

ECHO [41/91] import: playercreateinfo_spells.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\playercreateinfo_spells.sql

ECHO [42/91] import: creature_spawns.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_spawns.sql

ECHO [43/91] import: creature_staticspawns.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_staticspawns.sql

ECHO [44/91] import: creature_waypoints.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_waypoints.sql

ECHO [45/91] import: fishing.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\fishing.sql

ECHO [46/91] import: gameobject_spawns.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\gameobject_spawns.sql

ECHO [47/91] import: gameobject_staticspawns.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\gameobject_staticspawns.sql

ECHO [48/91] import: banned_pharses.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\banned_pharses.sql

ECHO [49/91] import: weather.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\weather.sql

ECHO [50/91] import: worldmap_info.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\worldmap_info.sql

ECHO [51/91] import: zoneguards.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\zoneguards.sql

ECHO [52/91] import: transport_data.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\transport_data.sql

ECHO [53/91] import: areatriggers.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\areatriggers.sql

ECHO [54/91] import: recall.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\recall.sql

ECHO [55/91] import: graveyards.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\graveyards.sql

ECHO [56/91] import: spelloverride.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\spelloverride.sql

ECHO [57/91] import: spell_disable.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\spell_disable.sql

ECHO [58/91] import: spell_disable_trainers.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\spell_disable_trainers.sql

ECHO [59/91] import: teleport_coords.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\teleport_coords.sql

ECHO [60/91] import: totemspells.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\totemspells.sql

ECHO [61/91] import: trainer_defs.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\trainer_defs.sql

ECHO [62/91] import: trainer_spells.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\trainer_spells.sql

ECHO [63/91] import: spell_proc_data.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\spell_proc_data.sql

ECHO [64/91] import: spell_coef_override.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\spell_coef_override.sql

ECHO [65/91] import: gameobject_names.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\gameobject_names.sql

ECHO [66/91] import: creature_names_localized.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\creature_names_localized.sql

ECHO [67/91] import: gameobject_names_localized.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\gameobject_names_localized.sql

ECHO [68/91] import: itempages_localized.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\itempages_localized.sql

ECHO [69/91] import: items_localized.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\items_localized.sql

ECHO [70/91] import: instance_bosses.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\instance_bosses.sql

ECHO [71/91] import: npc_text_localized.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\npc_text_localized.sql

ECHO [72/91] import: quests_localized.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\quests_localized.sql

ECHO [73/91] import: clientaddons.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\clientaddons.sql

ECHO [74/91] import: command_overrides.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\command_overrides.sql

ECHO [75/91] import: map_checkpoint.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\map_checkpoint.sql

ECHO [76/91] import: wordfilter_character_names.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\wordfilter_character_names.sql

ECHO [77/91] import: wordfilter_chat.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\wordfilter_chat.sql

ECHO [78/91] import: item_quest_association.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\item_quest_association.sql

ECHO [79/91] import: spell_effects_override.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\spell_effects_override.sql

ECHO [80/91] import: spell_proc.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\spell_proc.sql

ECHO [82/91] import: professiondiscoveries.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\professiondiscoveries.sql

ECHO [83/91] import: unit_display_sizes.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\unit_display_sizes.sql

ECHO [84/91] import: worldmap_info_localized.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\worldmap_info_localized.sql

ECHO [85/91] import: worldstring_tables.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\worldstring_tables.sql

ECHO [86/91] import: worldstring_tables_localized.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\worldstring_tables_localized.sql

ECHO [87/91] import: worldbroadcast_localized.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\worldbroadcast_localized.sql

ECHO [88/91] import: worldbroadcast.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\worldbroadcast.sql

ECHO [89/91] import: loot_milling.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\loot_milling.sql

ECHO [90/91] import: db_version.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\db_version.sql

ECHO [91/91] import: itemnames.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\itemnames.sql

ECHO [92/91] import: vendor_restrictions.sql
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %devsql%\vendor_restrictions.sql

ECHO Done.
ECHO.
ECHO Press any key to exit.
PAUSE >NUL
GOTO exit

:dumpworld
@ECHO OFF
CLS
if not exist "%dumppath%" mkdir %dumppath%
echo %world_db% Database Export started...
ECHO Dumping: ai_agents
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% ai_agents > %dumppath%\ai_agents.sql
ECHO Dumping: ai_threattospellid
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% ai_threattospellid > %dumppath%\ai_threattospellid.sql
ECHO Dumping: areatriggers
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% areatriggers > %dumppath%\areatriggers.sql
ECHO Dumping: auctionhouse
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% auctionhouse > %dumppath%\auctionhouse.sql
ECHO Dumping: clientaddons
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% clientaddons > %dumppath%\clientaddons.sql
ECHO Dumping: command_overrides
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% command_overrides > %dumppath%\command_overrides.sql
ECHO Dumping: creature_formations
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_formations > %dumppath%\creature_formations.sql
ECHO Dumping: creature_creature_timed_emotes
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_timed_emotes > %dumppath%\creature_timed_emotes.sql
ECHO Dumping: creature_names
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_names > %dumppath%\creature_names.sql
ECHO Dumping: creature_Banned Phrases
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% banned_phrases > %dumppath%\banned_pharses.sql
ECHO Dumping: creature_names_localized
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_names_localized > %dumppath%\creature_names_localized.sql
ECHO Dumping: creature_proto
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_proto > %dumppath%\creature_proto.sql
ECHO Dumping: creature_quest_finisher
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_quest_finisher > %dumppath%\creature_quest_finisher.sql
ECHO Dumping: creature_quest_starter
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_quest_starter > %dumppath%\creature_quest_starter.sql
ECHO Dumping: creature_spawns
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_spawns > %dumppath%\creature_spawns.sql
ECHO Dumping: creature_staticspawns
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_staticspawns > %dumppath%\creature_staticspawns.sql
ECHO Dumping: creature_waypoints
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% creature_waypoints > %dumppath%\creature_waypoints.sql
ECHO Dumping: loot_creatures
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% loot_creatures > %dumppath%\loot_creatures.sql
ECHO Dumping: loot_disenchanting
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% loot_disenchanting > %dumppath%\loot_disenchanting.sql
ECHO Dumping: fishing
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% fishing > %dumppath%\fishing.sql
ECHO Dumping: loot_fishing
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% loot_fishing > %dumppath%\loot_fishing.sql
ECHO Dumping: gameobject_names
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% gameobject_names > %dumppath%\gameobject_names.sql
ECHO Dumping: gameobject_names_localized
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% gameobject_names_localized > %dumppath%\gameobject_names_localized.sql
ECHO Dumping: gameobject_quest_finisher
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% gameobject_quest_finisher > %dumppath%\gameobject_quest_finisher.sql
ECHO Dumping: gameobject_quest_item_binding
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% gameobject_quest_item_binding > %dumppath%\gameobject_quest_item_binding.sql
ECHO Dumping: Itempetfood
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% itempetfood > %dumppath%\itempetfood.sql
ECHO Dumping: gameobject_quest_pickup_binding
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% gameobject_quest_pickup_binding > %dumppath%\gameobject_quest_pickup_binding.sql
ECHO Dumping: gameobject_quest_starter
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% gameobject_quest_starter > %dumppath%\gameobject_quest_starter.sql
ECHO Dumping: gameobject_spawns
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% gameobject_spawns > %dumppath%\gameobject_spawns.sql
ECHO Dumping: gameobject_staticspawns
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% gameobject_staticspawns > %dumppath%\gameobject_staticspawns.sql
ECHO Dumping: graveyards
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% graveyards > %dumppath%\graveyards.sql
ECHO Dumping: item_randomprop_groups
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% item_randomprop_groups > %dumppath%\item_randomprop_groups.sql
ECHO Dumping: item_randomsuffix_groups
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% item_randomsuffix_groups > %dumppath%\item_randomsuffix_groups.sql
ECHO Dumping: loot_items
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% loot_items > %dumppath%\loot_items.sql
ECHO Dumping: itempages
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% itempages > %dumppath%\itempages.sql
ECHO Dumping: itempages_localized
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% itempages_localized > %dumppath%\itempages_localized.sql
ECHO Dumping: itempetfood
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% itempetfood > %dumppath%\itempetfood.sql
ECHO Dumping: items
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% items > %dumppath%\items.sql
ECHO Dumping: instance_bosses
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% instance_bosses > %dumppath%\instance_bosses.sql
ECHO Dumping: items_localized
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% items_localized > %dumppath%\items_localized.sql
ECHO Dumping: map_checkpoint
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% map_checkpoint > %dumppath%\map_checkpoint.sql
ECHO Dumping: npc_gossip_textid
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% npc_gossip_textid > %dumppath%\npc_gossip_textid.sql
ECHO Dumping: npc_monstersay
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% npc_monstersay > %dumppath%\npc_monstersay.sql
ECHO Dumping: npc_text
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% npc_text > %dumppath%\npc_text.sql
ECHO Dumping: npc_text_localized
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% npc_text_localized > %dumppath%\npc_text_localized.sql
ECHO Dumping: loot_gameobjects
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% loot_gameobjects > %dumppath%\loot_gameobjects.sql
ECHO Dumping: petdefaultspells
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% petdefaultspells > %dumppath%\petdefaultspells.sql
ECHO Dumping: loot_pickpocketing
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% loot_pickpocketing > %dumppath%\loot_pickpocketing.sql
ECHO Dumping: playercreateinfo
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% playercreateinfo > %dumppath%\playercreateinfo.sql
ECHO Dumping: playercreateinfo_bars
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% playercreateinfo_bars > %dumppath%\playercreateinfo_bars.sql
ECHO Dumping: playercreateinfo_items
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% playercreateinfo_items > %dumppath%\playercreateinfo_items.sql
ECHO Dumping: playercreateinfo_skills
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% playercreateinfo_skills > %dumppath%\playercreateinfo_skills.sql
ECHO Dumping: playercreateinfo_spells
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% playercreateinfo_spells > %dumppath%\playercreateinfo_spells.sql
ECHO Dumping: loot_prospecting
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% loot_prospecting > %dumppath%\loot_prospecting.sql
ECHO Dumping: quests
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% quests > %dumppath%\quests.sql
ECHO Dumping: quests_localized
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% quests_localized > %dumppath%\quests_localized.sql
ECHO Dumping: recall
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% recall > %dumppath%\recall.sql
ECHO Dumping: reputation_creature_onkill
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% reputation_creature_onkill > %dumppath%\reputation_creature_onkill.sql
ECHO Dumping: reputation_faction_onkill
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% reputation_faction_onkill > %dumppath%\reputation_faction_onkill.sql
ECHO Dumping: reputation_instance_onkill
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% reputation_instance_onkill > %dumppath%\reputation_instance_onkill.sql
ECHO Dumping: loot_skinning
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% loot_skinning > %dumppath%\loot_skinning.sql
ECHO Dumping: spell_coef_override
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% spell_coef_override > %dumppath%\spell_coef_override.sql
ECHO Dumping: spell_disable
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% spell_disable > %dumppath%\spell_disable.sql
ECHO Dumping: spell_disable_trainers
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% spell_disable_trainers > %dumppath%\spell_disable_trainers.sql
ECHO Dumping: spell_proc_data
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% spell_proc_data > %dumppath%\spell_proc_data.sql
ECHO Dumping: spelloverride
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% spelloverride > %dumppath%\spelloverride.sql
ECHO Dumping: teleport_coords
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% teleport_coords > %dumppath%\teleport_coords.sql
ECHO Dumping: totemspells
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% totemspells > %dumppath%\totemspells.sql
ECHO Dumping: trainer_defs
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% trainer_defs > %dumppath%\trainer_defs.sql
ECHO Dumping: trainer_spells
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% trainer_spells > %dumppath%\trainer_spells.sql
ECHO Dumping: transport_creatures
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% transport_creatures > %dumppath%\transport_creatures.sql
ECHO Dumping: transport_data
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% transport_data > %dumppath%\transport_data.sql
ECHO Dumping: vendors
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% vendors > %dumppath%\vendors.sql
ECHO Dumping: weather
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% weather > %dumppath%\weather.sql
ECHO Dumping: wordfilter_character_names
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% wordfilter_character_names > %dumppath%\wordfilter_character_names.sql
ECHO Dumping: wordfilter_chat
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% wordfilter_chat > %dumppath%\wordfilter_chat.sql
ECHO Dumping: worldmap_info
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% worldmap_info > %dumppath%\worldmap_info.sql
ECHO Dumping: zoneguards
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% zoneguards > %dumppath%\zoneguards.sql
ECHO Dumping: item_quest_association
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% item_quest_association > %dumppath%\item_quest_association.sql
ECHO Dumping: spell_effects_override
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% spell_effects_override > %dumppath%\spell_effects_override.sql
ECHO Dumping: spell_proc
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% spell_proc > %dumppath%\spell_proc.sql
ECHO Dumping: spellfixes
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% spellfixes > %dumppath%\spellfixes.sql
ECHO Dumping: professiondiscoveries
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% professiondiscoveries > %dumppath%\professiondiscoveries.sql
ECHO Dumping: unit_display_sizes
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% unit_display_sizes > %dumppath%\unit_display_sizes.sql
ECHO Dumping: worldmap_info_localized
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% worldmap_info_localized > %dumppath%\worldmap_info_localized.sql
ECHO Dumping: worldstring_tables
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% worldstring_tables > %dumppath%\worldstring_tables.sql
ECHO Dumping: worldstring_tables_localized
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% worldstring_tables_localized > %dumppath%\worldstring_tables_localized.sql
ECHO Dumping: worldbroadcast_localized
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% worldbroadcast_localized > %dumppath%\worldbroadcast_localized.sql
ECHO Dumping: worldbroadcast
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% worldbroadcast > %dumppath%\worldbroadcast.sql
ECHO Dumping: loot_milling
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% loot_milling > %dumppath%\loot_milling.sql
ECHO Dumping: db_version
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% db_version > %dumppath%\db_version.sql
ECHO Dumping: db_version
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% db_version > %dumppath%\itemnames.sql
ECHO Dumping: db_version
%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% %world_db% db_version > %dumppath%\vendor_restrictions.sql


echo  Finished ... %world_db% exported to %dumppath% folder...
pause 
GOTO begin

:dumpchar
@ECHO OFF
CLS
SET sqlname=char-%DATE:~0,3% - %DATE:~4,2%-%DATE:~7,2%-%DATE:~10,4%--%TIME:~0,2%-%TIME:~3,2%
SET /p chardb=   Enter name of your character DB:
ECHO.
ECHO Dumping %sqlname%.sql to %dumppath%
%mysqlpath%\mysqldump -u%user% -p%pass% --result-file="%dumppath%\%sqlname%.sql" %chardb%
ECHO Done.
PAUSE
GOTO begin

:changeset
CLS
ECHO   Please Write down number of changeset (not the number of rev!!!)
ECHO   Or type in "a" to import all changesets
ECHO.
ECHO.
set /p ch=      Number:
ECHO.
IF %ch%==a GOTO changesetall
ECHO      Importing...
if not exist "%changsql%\changeset_%ch%.sql" GOTO error2
ECHO.

%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %changsql%\changeset_%ch%.sql
ECHO.
ECHO      File changeset_%ch%.sql imported sucesfully!
ECHO.
if %ch%==62 GOTO note62
set ch=
PAUSE
GOTO begin

:changesetall
CLS
ECHO.
ECHO import: Changesets
for %%C in (development\changesets\*.sql) do (
   ECHO import: %%~nxC
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < "%%~fC"
)
ECHO Changesets imported sucesfully!
ECHO.
PAUSE   
GOTO begin

:convert
CLS
ECHO	Converting..
%mysqlpath%\mysql -h %host% --user=%user% --password=%pass% --port=%port% %world_db% < %arc2ascent%
ECHO Done
ECHO.
PAUSE
GOTO begin

:dumpever
CLS
echo          Write the name of your database, where you have tables to dump.
echo.
REM set /p db=           Name:
REM IF %db%=="" GOTO error 
echo.
echo.
echo          Type there name of table, which you want to dump
echo          (if you want to dump more tables, type space between names):
echo.
set /p z=           Name(s):
IF %z%=="" GOTO error 
echo              Processing....
echo.
set bu1="%z%"

if not exist "%dumppath%" mkdir %dumppath%

%mysqlpath%\mysqldump -h %host% --user=%user% --password=%pass% --add-drop-table %world_db% "%bu1%" > "%dumppath%"\"%z%.sql"

@echo              Dump table(s) %z% from database %db% is/are succesfull !
set bu1=
set z=
set db=
echo.
pause
goto begin

:error
ECHO 	Please enter a correct character.
ECHO.
PAUSE
GOTO begin

:error2
ECHO 	Changeset with this number not found.
ECHO.
PAUSE
GOTO begin

:exit